{	Problem: http://codeforces.ru/problemset/problem/38/A
	Verdict: Accepted

}
var i,n,res,x,y:longint; a:array[1..101] of longint;
begin
readln(n);
for i:=2  to n do read(a[i]);
a[1]:=0;
res:=0;
readln(x,y);
for i:=x+1 to y do begin
  inc(res,a[i]);
end;
writeln(res);
end.
